package com.damage.purchase_dept.service;

import com.damage.common.dto.OrderSender;
import com.damage.common.entity.Order;
import com.damage.common.entity.OrderDetail;
import com.damage.common.exception.IncorrectStateException;
import com.damage.common.exception.ObsoleteException;
import com.damage.common.exception.RelateException;

import java.util.List;

public interface IOrderService {

    List<Order> generateOrderByPurchasePlanId(Integer purchasePlanId)throws IncorrectStateException,ObsoleteException;

    Integer setProcessInstanceId(Integer orderId, String processInstanceId);

    Order findById(Integer orderId);

    List<Order> findByPurchasePlanId(Integer purchasePlanId);

    List<OrderDetail> findDetailByOrderId(Integer orderId);

    List<Order> findByState(Integer state);

    Integer deleteByPurchasePlanId(Integer purchasePlanId);

    Integer sendOrder(Integer orderId, OrderSender orderSender) throws RelateException;
}
